extends AnimatedSprite


export var fp = 1.5
export var speed = 1.5

var direct = Vector2.ZERO
var velocity = Vector2.ZERO
var count = 0
var defaul_scale = 0.188

onready var src = global_position

func _ready():
	direct.x = -0.551062
	direct.y = 0.834465
	var sc = speed / 3
	scale.x = sc * defaul_scale
	scale.y = sc * defaul_scale

func _process(delta):
	count = count + delta
	if count > fp:
		if frame == 0:
			frame = 1
		playing = true
	
	if not playing:
		src = src + direct * speed * delta * 60
		set_global_position(src)

func _on_AnimatedSprite_animation_finished():
	queue_free()

